<form name='openapiForm' method='post' action='index.php?app=openapi&ctl=admin_test&act=result'>
    
    <div class="table-action">
        <{button label='提交' type='button' id='openapi-btn'}>
    </div>

    <input type="hidden" name="method1" value="<{$post['apiName']}>">

        <table width="100%" cellspacing="0" cellpadding="0" border="0" class='tableform'>
        <tr>
           <th>接口地址：</th>
            <td>
                <input type="text" value="<{$url}>" name='url' style="width:300px;" >
            </td>
        </tr>
        <tr>
            <th>接口名称：</th>
            <td><{$post['apiName']}></td>
        </tr>
        <tr>
            <th>接口说明：</th>
            <td><{$description['name']}></td>
        </tr>
        <tr>
            <th>接口描述：</th>
            <td><{$description['description']}></td>
        </tr>
        <tr>
        <th>参数：</th>
            <td>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                <tr>
                    <th>返回格式：</th>
                    <td><select name='data_format'><option value='json'>json</option><option value='xml'>xml</option></select></td>
                </tr>
                <tr>
                    <th><em style='color:red;padding:0 5px 0 0'>*</em>标识：</th>
                    <td><input type = "text" name="flag"></td>
                </tr>
                <tr>
                    <th><em style='color:red;padding:0 5px 0 0'>*</em>密钥：</th>
                    <td><input type = "text" name="token"></td>
                </tr>
                <{foreach from=$list item=item key=key}>
                <tr>
                    <th><{$item['name']}>：</th>
                    <td><{if $item['type'] == 'json'}>
                        <textarea name="<{$key}>" rows="3" cols="20" style="height:300px; width:300px;"></textarea>
                        <{else}>
                        <input type = "text" name = "<{$key}>" ><{$key}>[<{$item['type']}>]</td>
                        <{/if}>
                <tr>
                <{/foreach}>

                </table>
            </td>
        </tr>
        </table>
</form>

<script language="javascript" type="text/javascript">
$('openapi-btn').addEvent('click',function() {
    new Request.HTML({
        url:'index.php?app=openapi&ctl=admin_test&act=result',
        method:'post',
        update:$('resultarea'),
        data:this.form,
    }).send();
});

</script>